//-----------------------------------------------------------------------
// <copyright file="MessageReceivedEventArgs.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Microsoft.Live.Messenger
{
    using System;

    /// <summary>
    /// Represents the method that will handle the <see cref="Conversation.MessageReceived"/> event of <see cref="Conversation"/>.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">A <see cref="MessageReceivedEventArgs"/> object that contains event data.</param>
    public delegate void MessageReceivedEventHandler(object sender, MessageReceivedEventArgs e);

    /// <summary>
    /// Provides data for the <see cref="Conversation.MessageReceived"/> event.
    /// </summary>
    public class MessageReceivedEventArgs : EventArgs
    {
        private readonly Message message;

        /// <summary>
        /// Initializes a new instance of the <see cref="MessageReceivedEventArgs"/> class.
        /// </summary>
        /// <param name="message">The message that was received.</param>
        public MessageReceivedEventArgs(
            Message message)
        {
            this.message = message;
        }

        /// <summary>
        /// Gets the message that was received.
        /// </summary>
        public Message Message
        {
            get { return this.message; }
        }
    }
}